Repository navigation
Split ApplyEngine into focused partial modules - #11733
Conversation
There was a problem hiding this comment.
Copilot wasn't able to review any files in this pull request. Check if the Files changed in this pull request are included in default exclusions.
Co-authored-by: Evangelink <11340282+Evangelink@users.noreply.github.com>
There was a problem hiding this comment.
Note
🤖 Automated review by GitHub Copilot. Generated by the Expert Code Review workflow. To request a follow-up action, reply by tagging @copilot directly.
Review outcome: No actionable findings — this is a byte-for-byte mechanical refactor.
Change classification
- Internal tooling (
.github/workflows/unskip-closed-tests-tool/):ApplyEngine.cs(768 lines, one monolithicinternal static class) was split into apartial classspread acrossApplyEngine.cs,ApplyEngine.AgentSelection.cs,ApplyEngine.Edits.cs,ApplyEngine.FileIO.cs,ApplyEngine.Results.cs, andApplyEngine.Verification.cs, grouped by concern (agent-output parsing, syntax-tree edit construction, file I/O, result/PR-body building, and subprocess-based verification).
Confidence at a glance
🟢 Correctness & design — verified no behavioral delta
- Why it applies: Structural refactor of logic that enforces security/contract invariants (path containment, hash staleness checks, verification subprocess sandboxing) for an internal CI tool.
- Evidence: Extracted and sorted every non-boilerplate statement line from the pre-refactor
ApplyEngine.cs(git history) and from the six post-refactor files; the two sorted sets are identical line-for-line (470 lines each, zero diff). No method bodies, field initializers, or control flow were altered — onlyusing/namespace/class-declaration boilerplate and method placement changed. - Gap or disposition: None. This is pure code organization; the restricted-env-var allowlist, path/reparse-point guards, overlapping-edit rejection, and verification timeout/kill-tree handling are all preserved verbatim.
- Action: None.
🟢 Naming & conventions — file-scoped namespace, BOM, partial-class pattern all consistent
- Why it applies: New files must follow repo conventions (UTF-8 BOM, file-scoped namespace, StyleCop rules).
- Evidence: All six files use file-scoped
namespace UnskipClosedTests.Tool;, carry a UTF-8 BOM, and the split uses the standardinternal static partial class ApplyEnginepattern consistently across files. - Action: None.
⚪ Not applicable: Threading & concurrency, Security & IPC, Public API & compatibility, Performance, Cross-TFM, Resource management, Localization, Tests, Analyzers, Build/dependencies/scripts, IPC wire compatibility (this tool is internal CI tooling, not a shipping MSTest/MTP package; no public API, resource, or wire-format surface is touched; no test files changed in this PR).
ApplyEngine.cscombined orchestration, selection parsing, source edits, verification, file I/O, and result shaping in one 768-line file. This refactor separates those responsibilities without changing behavior or API surface.Orchestration
ApplyAsyncand shared records inApplyEngine.cs.Focused modules
ApplyEngine.AgentSelection.cs.ApplyEngine.Edits.cs.ApplyEngine.Verification.cs.ApplyEngine.FileIO.cs.ApplyEngine.Results.cs.Compatibility
ApplyEngineinternal and static using partial declarations.